const express=require('express')
const router=express.Router()

//用户路由处理函数对应的中间件
const oper_Handler=require('../router_handler/operator')
//导入验证数据中间件
const expressJoi=require('@escook/express-joi')
const {docoper_find,reset_schema,docoper_schema,delete_schema,docoper_update_schema}=require('../schema/user')

router.post('/findall',oper_Handler.operatorall)
router.post('/insert',expressJoi(docoper_schema),oper_Handler.operatorinsert)
router.post('/delete',expressJoi(delete_schema),oper_Handler.operatordelete)
router.post('/update',expressJoi(docoper_update_schema),oper_Handler.operatorupdate)
router.post('/reset',expressJoi(reset_schema),oper_Handler.operatorreset)
router.post('/find',expressJoi(docoper_find),oper_Handler.find)
module.exports=router